package com.example.hangzhou.welbeing.mytestdemoapp.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

import com.example.hangzhou.welbeing.mytestdemoapp.R;
import com.example.hangzhou.welbeing.mytestdemoapp.adpater.MyPagerAdapter;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 杭州惟君医疗科技有限公司15
 * Created by 20433 on 2018/4/23
 *
 * @desc 东风山河绿，春已不折柳，繁花看不尽，处处惹人留
 * @desc 佛祖镇楼，bug辟容易
 */

public class MyRecyclerviewActivity extends AppCompatActivity {


    @Bind(R.id.activity_my_recyclerview_home_tb_titles)
    TabLayout activityMyRecyclerviewHomeTbTitles;
    @Bind(R.id.activity_my_recyclerview_home_viewpager)
    ViewPager activityMyRecyclerviewHomeViewpager;



    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_recyclerview_home);
        ButterKnife.bind(this);
        //ViewPager的适配器
        MyPagerAdapter    adapter = new MyPagerAdapter(getSupportFragmentManager());
        activityMyRecyclerviewHomeViewpager.setAdapter(adapter);
        //绑定
        activityMyRecyclerviewHomeTbTitles.setupWithViewPager(activityMyRecyclerviewHomeViewpager);


    }
}
